<template>
  <div style="min-height:100vh;background:#f5f5f5">
    <router-link to="toLogin"></router-link>
    <div class="topbar">
        <a href="javascript:history.back(-1)" style="position:absolute;left:4vw;color:#ffffff"><img src="@/images/neitui/arrow-left.png" alt="" style="width:15px"></a>
      提现申请
      <router-link to="/getPutforward" style="position:absolute;right: 4vw;color:#ffffff;font-size:15px">提现记录</router-link>
    </div>
    <cash-apply-top :data="data"></cash-apply-top> 
    <set-putforward :allMoney="data.money"></set-putforward>
  </div>
</template>

<script>
import cashApplyTop from '@/components/cashApply/cashApplyTop.vue'
import setPutforward from '@/components/cashApply/setPutforward.vue'
import request from '@/request/index.js'
  export default {
    name: 'cashApply',
    components:{
      cashApplyTop,
      setPutforward,
    },
    data(){
      return{
        data:{},
        name:'',
        username:'',
        number:'',
        money:'',
        type:1,
      }
    },
    methods:{

    },
    mounted(){
      const loading = this.$loading({
                // ...options
                color:'#55A9FF',
                overlayColor:'rgba(0,0,0,.5)',
                className: 'loadingStyle',
            });
     if(this.$route.query.token){
                this.$cookie.set('token',this.$route.query.token,7);
                this.token=this.$cookie.get('token');
            }else{
                if(this.$cookie.get('token')){
                    this.token=this.$cookie.get('token');
                }
                else{
                    document.getElementById('toLogin').click();
                }
            }
      request.getExtract(this,loading);
    }
  }
</script>

<style scoped lang="scss">
  .topbar{
    background:#55A9FF;
    color:#ffffff;
    text-align: center;
    font-size: 18px;
    line-height: 45px;

  }
</style>
